+Mon Jun 4 15:05:24 2001 Jonathan Blandford <jrb@redhat.com>
+
+ * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_set_max_width):
+ Fix segfault found by Vitaly Tishkov <tvv@sparc.spb.su>.
+ (gtk_tree_view_column_set_min_width): ditto.
+
Tue Jun 5 11:04:06 2001 Owen Taylor <otaylor@redhat.com>
* gdk/gdkpixmap.h (GDK_PIXMAP_GET_CLASS):
+Mon Jun 4 15:05:24 2001 Jonathan Blandford <jrb@redhat.com>
+
+ * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_set_max_width):
+ Fix segfault found by Vitaly Tishkov <tvv@sparc.spb.su>.
+ (gtk_tree_view_column_set_min_width): ditto.
+
Tue Jun 5 11:04:06 2001 Owen Taylor <otaylor@redhat.com>
* gdk/gdkpixmap.h (GDK_PIXMAP_GET_CLASS):
+Mon Jun 4 15:05:24 2001 Jonathan Blandford <jrb@redhat.com>
+
+ * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_set_max_width):
+ Fix segfault found by Vitaly Tishkov <tvv@sparc.spb.su>.
+ (gtk_tree_view_column_set_min_width): ditto.
+
Tue Jun 5 11:04:06 2001 Owen Taylor <otaylor@redhat.com>
* gdk/gdkpixmap.h (GDK_PIXMAP_GET_CLASS):
+Mon Jun 4 15:05:24 2001 Jonathan Blandford <jrb@redhat.com>
+
+ * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_set_max_width):
+ Fix segfault found by Vitaly Tishkov <tvv@sparc.spb.su>.
+ (gtk_tree_view_column_set_min_width): ditto.
+
Tue Jun 5 11:04:06 2001 Owen Taylor <otaylor@redhat.com>
* gdk/gdkpixmap.h (GDK_PIXMAP_GET_CLASS):
+Mon Jun 4 15:05:24 2001 Jonathan Blandford <jrb@redhat.com>
+
+ * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_set_max_width):
+ Fix segfault found by Vitaly Tishkov <tvv@sparc.spb.su>.
+ (gtk_tree_view_column_set_min_width): ditto.
+
Tue Jun 5 11:04:06 2001 Owen Taylor <otaylor@redhat.com>
* gdk/gdkpixmap.h (GDK_PIXMAP_GET_CLASS):
+Mon Jun 4 15:05:24 2001 Jonathan Blandford <jrb@redhat.com>
+
+ * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_set_max_width):
+ Fix segfault found by Vitaly Tishkov <tvv@sparc.spb.su>.
+ (gtk_tree_view_column_set_min_width): ditto.
+
Tue Jun 5 11:04:06 2001 Owen Taylor <otaylor@redhat.com>
* gdk/gdkpixmap.h (GDK_PIXMAP_GET_CLASS):
+Mon Jun 4 15:05:24 2001 Jonathan Blandford <jrb@redhat.com>
+
+ * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_set_max_width):
+ Fix segfault found by Vitaly Tishkov <tvv@sparc.spb.su>.
+ (gtk_tree_view_column_set_min_width): ditto.
+
Tue Jun 5 11:04:06 2001 Owen Taylor <otaylor@redhat.com>
* gdk/gdkpixmap.h (GDK_PIXMAP_GET_CLASS):
g_return_val_if_fail (GTK_IS_TREE_VIEW (container), FALSE);
g_return_val_if_fail (GTK_WIDGET_VISIBLE (container), FALSE);
+ g_print ("gtk_tree_view_focus\n");
tree_view = GTK_TREE_VIEW (container);
if (!GTK_WIDGET_IS_SENSITIVE (container))
{
GtkRBTree *cursor_tree = NULL;
GtkRBNode *cursor_node = NULL;
+ GtkRBTree *new_cursor_tree = NULL;
+ GtkRBNode *new_cursor_node = NULL;
GtkTreePath *cursor_path = NULL;
cursor_path = NULL;
if (tree_view->priv->cursor)
cursor_path = gtk_tree_row_reference_get_path (tree_view->priv->cursor);
- g_print ("up_down: cursor path is %s\n", cursor_path?"non NULL":"NULL");
+ if (cursor_path == NULL)
+ return;
+
_gtk_tree_view_find_node (tree_view, cursor_path,
- &cursor_tree,
- &cursor_node);
- gtk_tree_view_queue_draw_path (tree_view, cursor_path, NULL);
- if (tree_view->priv->cursor)
- {
- gtk_tree_row_reference_free (tree_view->priv->cursor);
- tree_view->priv->cursor = NULL;
- }
+ &cursor_tree, &cursor_node);
if (count == -1)
_gtk_rbtree_prev_full (cursor_tree, cursor_node,
- &cursor_tree, &cursor_node);
+ &new_cursor_tree, &new_cursor_node);
else
_gtk_rbtree_next_full (cursor_tree, cursor_node,
- &cursor_tree, &cursor_node);
- gtk_tree_path_free (cursor_path);
+ &new_cursor_tree, &new_cursor_node);
- if (cursor_node)
+ if (new_cursor_node)
{
- cursor_path = _gtk_tree_view_find_path (tree_view,
- cursor_tree,
- cursor_node);
- if (cursor_path)
- {
- _gtk_tree_selection_internal_select_node (tree_view->priv->selection,
- cursor_node,
- cursor_tree,
- cursor_path,
- extend_selection?0:0);
-
- tree_view->priv->cursor = gtk_tree_row_reference_new_proxy (G_OBJECT (tree_view), tree_view->priv->model, cursor_path);
- gtk_tree_view_queue_draw_path (tree_view, cursor_path, NULL);
+ gtk_tree_path_free (cursor_path);
- gtk_tree_path_free (cursor_path);
- }
+ cursor_path = _gtk_tree_view_find_path (tree_view, new_cursor_tree, new_cursor_node);
+ _gtk_tree_selection_internal_select_node (tree_view->priv->selection,
+ new_cursor_node,
+ new_cursor_tree,
+ cursor_path,
+ extend_selection?GDK_SHIFT_MASK:0);
+ gtk_tree_row_reference_free (tree_view->priv->cursor);
+ tree_view->priv->cursor = gtk_tree_row_reference_new_proxy (G_OBJECT (tree_view), tree_view->priv->model, cursor_path);
+ gtk_tree_view_clamp_node_visible (tree_view, new_cursor_tree, new_cursor_node);
+ }
+ else
+ {
gtk_tree_view_clamp_node_visible (tree_view, cursor_tree, cursor_node);
- gtk_widget_grab_focus (GTK_WIDGET (tree_view));
}
+
+ gtk_widget_grab_focus (GTK_WIDGET (tree_view));
+ gtk_tree_view_queue_draw_path (tree_view, cursor_path, NULL);
+ gtk_tree_path_free (cursor_path);
}
void
PROP_ALIGNMENT,
g_param_spec_float ("alignment",
_("Alignment"),
- _("Alignment of the column header text or widget"),
+ _("X Alignment of the column header text or widget"),
0.0,
1.0,
0.5,
if (min_width == tree_column->min_width)
return;
+ if (tree_column->tree_view == NULL)
+ {
+ tree_column->min_width = min_width;
+ return;
+ }
+
real_min_width = (tree_column->min_width == -1) ?
tree_column->button->requisition.width : tree_column->min_width;
/* We want to queue a resize if the either the old min_size or the
* new min_size determined the size of the column */
- if (tree_column->tree_view &&
- GTK_WIDGET_REALIZED (tree_column->tree_view))
+ if (GTK_WIDGET_REALIZED (tree_column->tree_view))
{
if ((tree_column->min_width > tree_column->width) ||
(tree_column->min_width == -1 &&
gtk_tree_view_column_set_max_width (GtkTreeViewColumn *tree_column,
gint max_width)
{
- gint real_min_width;
+ gint real_max_width;
g_return_if_fail (tree_column != NULL);
g_return_if_fail (GTK_IS_TREE_VIEW_COLUMN (tree_column));
if (max_width == tree_column->max_width)
return;
- real_min_width = tree_column->min_width == -1 ?
- tree_column->button->requisition.width : tree_column->min_width;
+ if (tree_column->tree_view == NULL)
+ {
+ tree_column->max_width = max_width;
+ return;
+ }
+
+ real_max_width = tree_column->max_width == -1 ?
+ tree_column->button->requisition.width : tree_column->max_width;
if (tree_column->tree_view &&
GTK_WIDGET_REALIZED (tree_column->tree_view) &&
tree_column->max_width = max_width;
- if (real_min_width > max_width)
- tree_column->min_width = max_width;
+ if (real_max_width > max_width)
+ tree_column->max_width = max_width;
g_object_notify (G_OBJECT (tree_column), "max_width");
}
g_object_notify (G_OBJECT (tree_column), "alignment");
}
+/**
+ * gtk_tree_view_column_get_alignment:
+ * @tree_column: A #GtkTreeViewColumn.
+ *
+ * Returns the current x alignment of @tree_column. This value can range
+ * between 0.0 and 1.0.
+ *
+ * Return value: The current alignent of @tree_column.
+ **/
gfloat
gtk_tree_view_column_get_alignment (GtkTreeViewColumn *tree_column)
{